<%@ include file="/taglibs.jsp"%>

<title>MyUsers ~ User List</title>

<button onclick="location.href='user.do?method=edit'">Add User</button>

<table class="list">
	<thead>
		<tr>
			<th><bean:message key="user.username"/></th>
			<th><bean:message key="user.firstName"/></th>
			<th><bean:message key="user.lastName"/></th>
		</tr>
	</thead>
	<tbody>
		<c:forEach var="user" items="${users}" varStatus="status">
			<c:choose>
				<c:when test="${status.count % 2 == 0}"><tr class="even"></c:when>
				<c:otherwise><tr class="odd"></c:otherwise>
			</c:choose>
				<td><a href="user.do?method=edit&amp;userID=${user.userID}">${user.username}</a> - <a href="user.do?method=delete&amp;user.userID=${user.userID}">Remove</a></td>
				<td>${user.firstName}</td>
				<td>${user.lastName}</td>
			</tr>
		</c:forEach>
	</tbody>
</table>